package StudyCode.summary.zipfile;

import java.io.*;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadFileUsingBufferedInputStream {
	public static void main(String[] args) {
		File file = new File("E:/Copy/2.txt");
		BufferedInputStream bin = null;

		try {
			FileInputStream fin = new FileInputStream(file);
			bin = new BufferedInputStream(fin);
			while (bin.available() > 0) {
				System.out.print((char) bin.read());
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException ioe) {
			ioe.printStackTrace();
		} finally {
			try {
				if (bin != null)
					bin.close();

			} catch (IOException ioe) {
				ioe.printStackTrace();
			}

		}
	}
}
